|
![](/i/fill.gif) |
"Jan Walzer" wrote:
> But also small translation (or jittering) of the sphere would involve
> a complete check of all other spheres if I don't do anything else...
> Maybe I could (after I detected some collisions) save the nearest ones
> and only check these ones ...
Usually jittering is done in such way to make it impossible to have intersections.
That would make it a O(0)... ;-)
If R is the radius of the sphere you're placing and 1/L^2 is the density you want to
get (x_step=L, z_step=L) then you can translate your sphere by L/2-R maximum in any
direction. That should prevent any intersection, and yet make it possible to have
spheres touching each other.
Of course L>=2*max(Ri)i=1,2,...n.
> But I found a problem in my other approach. Does POV-Ray support some-
> thing like chained-lists efficiently ? I don't know, how to find out,
> if I have a given box, which of my thousands spheres are in that very
> one box.
I did it once. IIRC it was a real puzzle, I began to meet arrays in my not so quiet
dreams... :-|
--
Jonathan.
Home: http://digilander.iol.it/jrgpov
Post a reply to this message
|
![](/i/fill.gif) |